package cn.ltgodm.template.user.mapper;

import cn.ltgodm.template.common.domain.entity.Role;
import cn.ltgodm.template.common.domain.vo.RoleVO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author wenpeng
* @description 针对表【lt_role(角色信息表)】的数据库操作Mapper
* @createDate 2024-03-17 22:12:11
* @Entity cn.ltgodm.template.common.domain.entity.Role
*/
public interface RoleMapper extends BaseMapper<Role> {

    List<RoleVO> selectRolePermissionByUserId(Long userId);

    IPage<RoleVO> selectRoleList(IPage<RoleVO> page, @Param("ew") LambdaQueryWrapper<Role> lqw,@Param("params") Map<String, Object> params);

    Role checkRoleNameUnique(String roleName);

    Role checkRoleKeyUnique(String roleKey);

    RoleVO selectRoleById(Long roleId);
}




